<extend name="Particulars/index" /> 

<block name="title">
<title>{$info.title}</title>
</block>

<block name="main">
<div class="container">
	<!-- Article activities for width under 768px -->
	<div class="related-avatar-group activities"></div>
	<div class="article">
		<div class="preview">
			<!--作者信息-->
			<div class="author-info">
				<!--判断是否登录-->
				<if condition="$is_login EQ 1">
					<if condition="$is_attention EQ 1">
						<div id="attention" class="btn btn-small follow following">
							<a data-signin-link="true" data-toggle="modal" href="javascript:void(0);"><i class="fa fa-fw fa-check"></i><span>正在关注</span></a>
						</div>
					<else/>
						<div id="attention" class="btn btn-small follow btn-success">
							<a data-signin-link="true" data-toggle="modal" href="javascript:void(0);"><i class="fa fa-fw fa-plus"></i><span>添加关注</span></a>
						</div>
					</if>
				<else />
					<!--没有登录  点击关注后去登录页面-->
					<div class="btn btn-small btn-success follow">
						<a data-signin-link="true" data-toggle="modal" href="{:U('Home/User/Login')}"><i class="fa fa-plus"></i><span>添加关注</span></a>
					</div>
				</if>
				<!--判断作者是否有自定义头像  没有自定义头像显示默认头像-->
				<a class="avatar" href="{:U('Home/User/Info',array('id' => $userinfo[uid]))}">
					<empty name="userinfo.head_img">
						<img src="__PUBLIC__/Picture/e6716d6e36154d1199319a551b5b3d89.gif" alt="100" />
					<else/>
						<img src="{$userinfo.head_img}" alt="100" />
					</empty>
				</a>
				<span class="label">
					作者
				</span>
				<a class="author-name blue-link" href="{:U('Home/User/Info',array('id' => $userinfo[uid]))}">
					<span>{$userinfo.nickname}</span>
				</a>
				<span data-toggle='tooltip' data-original-title='最后编辑于 {$info.time}'>{$info.time}*</span>
				<div>
					<span>被{$userinfo.attention_count}人关注</span>，<span>获得了{$userinfo.like_count}个喜欢</span>
				</div>
			</div>
			<!--作者信息end-->
			<!--文章标题-->
			<h1 class="title">{$info.title}</h1>
			<div class="meta-top">
				<!--阅读-->
				<span> 阅读{$info.click}</span>
				<!--评论-->
				<span>评论{$info.comment_count}</span>
				<!--喜欢-->
				<span>喜欢{$info.like_count}</span>
			</div>
			<!-- Collection/Bookmark/Share for width under 768px -->
			<div class="article-share"></div>
			<!-- -->
			<!--文章内容主体-->
			<div class="show-content">
				{$info.content}
			</div>
			<!--文章内容主体end-->
		</div>
	</div>
	<!--文章版权-->
	<div class="visitor_edit">
		<div class="pull-right">
			<!-- copyright -->
			<div class="author-copyright pull-right" data-toggle="tooltip" data-html="true" title="转载请联系作者获得授权，并标注“简书作者”。">
				<a><i class="fa fa-copyright"></i>著作权归作者所有</a>
			</div>
		</div>
	</div>
	<!--文章版权end-->

	<!--文章打赏内容-->
	<!-- Reward / Support Author -->
	<div class="support-author">
		<p>如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作！</p>
		<a class="btn btn-pay" data-toggle="modal" href="#pay-modal">¥ 打赏支持</a>
		<div class="avatar-list">
			<volist name="ds_list" id="vo">
				<a data-created-at="2016-07-24T10:49:16+08:00" data-nickname="{$vo.nickname}" class="avatar" href="{:U('Home/User/Info',array('id' => $vo[uid]))}" data-original-title="" title="">
					<empty name="vo.head_img">
						<img src="__PUBLIC__/Picture/e6716d6e36154d1199319a551b5b3d89.gif" alt="100" />
					<else/>
						<img src="{$vo.head_img}" alt="100" />
					</empty>
				</a>
			</volist>
		</div>
	</div>
	<!--文章打赏内容end-->


	<!--文章喜欢和分享内容-->
	<!-- article meta bottom -->
	<div class="meta-bottom clearfix">
		<!--判断是否登录-->
		<if condition="$is_login EQ 1">
			<if condition="$is_like EQ 1">
				<!--  Like Button -->
				<div class="like note-liked">
					<div class="like-button">
						<a id="like-note" class="like-content" data-signin-link="true" data-toggle="modal" href="javascript:void(0);">
							<i class="fa fa-heart-o"></i>喜欢
						</a>
					</div>
					<span id="likes-count" data-toggle="tooltip" data-placement="right" title="查看所有喜欢的用户">
						{$info.like_count}
					</span>
				</div>
			<else/>
				<!--  Like Button -->
				<div class="like ">
					<div class="like-button">
						<a id="like-note" class="like-content" data-signin-link="true" data-toggle="modal" href="javascript:void(0);">
							<i class="fa fa-heart-o"></i>喜欢
						</a>
					</div>
					<span id="likes-count" data-toggle="tooltip" data-placement="right" title="查看所有喜欢的用户">
						{$info.like_count}
					</span>
				</div>
			</if>
		<else />
			<!--  Like Button -->
			<div class="like">
				<div class="like-button">
					<a class="like-content" data-signin-link="true" data-toggle="modal" href="{:U('Home/User/Login')}">
						<i class="fa fa-heart-o"></i>喜欢
					</a>
				</div>
				<span id="likes-count" data-toggle="tooltip" data-placement="right" title="查看所有喜欢的用户">
					{$info.like_count}
				</span>
			</div>
		</if>

		<!--  share group -->
		<div class="share-group pull-right">
			<a href="javascript:void((function(s,d,e,r,l,p,t,z,c){var%20f=&#39;http://v.t.sina.com.cn/share/share.php?appkey=1881139527&#39;,u=z||d.location,p=[&#39;&amp;url=&#39;,e(u),&#39;&amp;title=&#39;,e(t||d.title),&#39;&amp;source=&#39;,e(r),&#39;&amp;sourceUrl=&#39;,e(l),&#39;&amp;content=&#39;,c||&#39;gb2312&#39;,&#39;&amp;pic=&#39;,e(p||&#39;&#39;)].join(&#39;&#39;);function%20a(){if(!window.open([f,p].join(&#39;&#39;),&#39;mb&#39;,[&#39;toolbar=0,status=0,resizable=1,width=440,height=430,left=&#39;,(s.width-440)/2,&#39;,top=&#39;,(s.height-430)/2].join(&#39;&#39;)))u.href=[f,p].join(&#39;&#39;);};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent,&#39;&#39;,&#39;&#39;,&#39;http://cwb.assets.jianshu.io/notes/images/4886459/weibo/image_0569e8ff727f.jpg&#39;, &#39;推荐 八里唐 的文章《如何利用好暑假为下半年英语四六级考试做准备》（ 分享自 @简书 ）&#39;,&#39;http://www.jianshu.com/p/3756f50f93b7&#39;,&#39;页面编码gb2312|utf-8默认gb2312&#39;));" data-name="weibo">
				<i class="fa fa-weibo"></i><span>分享到微博</span>
			</a>
			<a data-toggle="modal" href="#share-weixin-modal" data-name="weixin">
				<i class="fa fa-weixin"></i><span>分享到微信</span>
			</a>
			<div class="more">
				<a href="javascript:void(0)" data-toggle="dropdown">更多分享<i class="fa fa-caret-down"></i></a>
				<ul class="dropdown-menu arrow-top">
					<li>
						<a href="http://cwb.assets.jianshu.io/notes/images/4886459/weibo/image_0569e8ff727f.jpg" target="_blank" data-name="changweibo"><i class="fa fa-arrow-circle-o-down"></i> 下载长微博图片</a>
					</li>
					<li>
						<a data-name="tweibo" href="javascript:void(function(){var d=document,e=encodeURIComponent,r=&#39;http://share.v.t.qq.com/index.php?c=share&amp;a=index&amp;url=&#39;+e(&#39;http://www.jianshu.com/p/3756f50f93b7&#39;)+&#39;&amp;title=&#39;+e(&#39;推荐 八里唐 的文章《如何利用好暑假为下半年英语四六级考试做准备》（ 分享自 @jianshuio ）&#39;),x=function(){if(!window.open(r,&#39;tweibo&#39;,&#39;toolbar=0,resizable=1,scrollbars=yes,status=1,width=600,height=600&#39;))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();">
						<img src="__PUBLIC__/Picture/tweibo.png" alt="Tweibo" /> 分享到腾讯微博
						</a>
					</li>
					<li>
						<a data-name="qzone" href="javascript:void(function(){var d=document,e=encodeURIComponent,r=&#39;http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=&#39;+e(&#39;http://www.jianshu.com/p/3756f50f93b7&#39;)+&#39;&amp;title=&#39;+e(&#39;推荐 八里唐 的文章《如何利用好暑假为下半年英语四六级考试做准备》&#39;),x=function(){if(!window.open(r,&#39;qzone&#39;,&#39;toolbar=0,resizable=1,scrollbars=yes,status=1,width=600,height=600&#39;))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();">
							<img src="__PUBLIC__/Picture/qzone.png" alt="Qzone" /> 分享到QQ空间
						</a>
					</li>
					<li>
						<a data-name="twitter" href="javascript:void(function(){var d=document,e=encodeURIComponent,r=&#39;https://twitter.com/share?url=&#39;+e(&#39;http://www.jianshu.com/p/3756f50f93b7&#39;)+&#39;&amp;text=&#39;+e(&#39;推荐 八里唐 的文章《如何利用好暑假为下半年英语四六级考试做准备》（ 分享自 @jianshucom ）&#39;)+&#39;&amp;related=&#39;+e(&#39;jianshucom&#39;),x=function(){if(!window.open(r,&#39;twitter&#39;,&#39;toolbar=0,resizable=1,scrollbars=yes,status=1,width=600,height=600&#39;))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();">
							<img src="__PUBLIC__/Picture/twitter.png" alt="Twitter" /> 分享到Twitter
						</a>
					</li>
					<li>
						<a data-name="facebook" href="javascript:void(function(){var d=document,e=encodeURIComponent,r=&#39;https://www.facebook.com/dialog/share?app_id=483126645039390&amp;display=popup&amp;href=http://www.jianshu.com/p/3756f50f93b7&#39;,x=function(){if(!window.open(r,&#39;facebook&#39;,&#39;toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330&#39;))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();">
							<img src="__PUBLIC__/Picture/facebook.png" alt="Facebook" /> 分享到Facebook
						</a>
					</li>
					<li>
						<a data-name="google_plus" href="javascript:void(function(){var d=document,e=encodeURIComponent,r=&#39;https://plus.google.com/share?url=&#39;+e(&#39;http://www.jianshu.com/p/3756f50f93b7&#39;),x=function(){if(!window.open(r,&#39;google_plus&#39;,&#39;toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330&#39;))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();">
							<img src="__PUBLIC__/Picture/google_plus.png" alt="Google plus" /> 分享到Google+
						</a>
					</li>
					<li>
						<a data-name="douban" href="javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:&#39;&#39;,r=&#39;http://www.douban.com/recommend/?url=&#39;+e(&#39;http://www.jianshu.com/p/3756f50f93b7&#39;)+&#39;&amp;title=&#39;+e(&#39;如何利用好暑假为下半年英语四六级考试做准备&#39;)+&#39;&amp;sel=&#39;+e(s)+&#39;&amp;v=1&#39;,x=function(){if(!window.open(r,&#39;douban&#39;,&#39;toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330&#39;))location.href=r+&#39;&amp;r=1&#39;};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()">
							<img src="__PUBLIC__/Picture/douban.png" alt="Douban" /> 分享到豆瓣
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<!--文章喜欢和分享内容end-->

	<!--文章微信分享提示-->
	<!-- Modals -->
	<div id="share-weixin-modal" class="modal hide fade share-weixin-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		</div>
		<div class="modal-body">
			<h5>打开微信“扫一扫”，打开网页后点击屏幕右上角分享按钮</h5>
		</div>
	</div>
	<div id="notebooks-menu" class="panel notebooks-menu arrow-top modal hide fade"><img class="loader-tiny" src="__PUBLIC__/Picture/tiny.gif" alt="Tiny" /></div>
	<div id="collection-menu" class="panel collection-menu arrow-top modal hide fade"><img class="loader-tiny" src="__PUBLIC__/Picture/tiny.gif" alt="Tiny" /></div>
	<!--文章微信分享提示end-->

	<!--文章喜欢的用户列表-->
	<div id="likes-modal" class="modal modal_new support_list-modal hide fade" style="text-align: center;" tabindex="-1" role="dialog">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3>喜欢的用户</h3>
				</div>
				<div class="modal-body">
					<ul class="unstyled users" id="likelist"></ul>
				</div>
			</div>
		</div>
	</div>
	<!--文章喜欢的用户列表end-->

	<!--文章评论列表-->
	<!-- Comments -->
	<div id="comments" class="comment-list clearfix">
		<div class="comment-head clearfix">
			{$comment_num}条评论
			<span class="order">
				（
				<a data-order="date" class="active" href="javascript:void(0)">按时间正序</a>·
				<a data-order="date desc" href="javascript:void(0)">按时间倒序</a>·
				<a data-order="zan desc" href="javascript:void(0)">按喜欢排序</a>
				）
			</span>
			<if condition="$is_login EQ 1">
				<a class="goto-comment pull-right" href="#pinglun">
					<i class="fa fa-pencil"></i>添加新评论
				</a>
			<else/>
				<a class="goto-comment pull-right" data-signin-link="true" data-toggle="modal" href="{:U('Home/User/Login')}">
					<i class="fa fa-pencil"></i>添加新评论
				</a>
			</if>
		</div>
		<div id="comment-list">
			<volist name="comment_list" id="vo">
				<div class="note-comment clearfix">
					<div class="content">
						<div class="meta-top">
							<a href="{:U('Home/User/Info',array('id' => $vo[uid]))}" class="avatar">
								<empty name="vo.head_img">
									<img src="__PUBLIC__/Picture/e6716d6e36154d1199319a551b5b3d89.gif" alt="100" />
								<else/>
									<img src="{$vo.head_img}" alt="100" />
								</empty>
							</a>
							<p>
								<a href="{:U('Home/User/Info',array('id' => $vo[uid]))}" class="author-name">{$vo.nickname}</a>
							</p>
							<span class="reply-time">
							<small>{$vo.floor}楼 · </small>
							<a href="javascript:void(0)">{$vo.date}</a></span>
						</div>
						<p>{$vo.content}</p>
						<div class="comment-footer clearfix text-right">
							<a href="javascript:void(0)" class="like pull-left likecomment" data-id="{$vo.cmtid}">
								<if condition="$vo.zan_status EQ 1">
									<i class="fa fa-heart"></i>喜欢<span class="zan">({$vo.zan})</span>
								<else/>
									<i class="fa fa-heart-o"></i>喜欢<span class="zan">({$vo.zan})</span>
								</if>
								
							</a>
							<a href="javascript:void(0)" class="reply" data-nickname="{$vo.nickname}" data-id="{$vo.cmtid}">回复</a>
							<notempty name="vo.list">
								<div class="child-comment-list">
									<volist name="vo.list" id="vos">
										<div class="child-comment">
											<p class="text-left">
												<a href="{:U('Home/User/Info',array('id' => $vos[uid]))}" class="blue-link">{$vos.nickname}</a>：
												<a target="_blank" class="maleskine-author" href="{:U('Home/User/Info',array('id' => $vos[ruid]))}">@{$vos.user.nickname}</a> {$vos.content}
											</p>
											<div class="child-comment-footer text-right clearfix">
												<a href="javascript:void(null)" class="reply" data-nickname="{$vos.nickname}" data-id="{$vo.cmtid}">回复</a>
												<span class="reply-time pull-left">
													<a href="javascript:void(0)">{$vos.date}</a>
												</span>
											</div>
										</div>
									</volist>
									<div data-state="remaining-child-comments"></div>
									<div class="comment-toolbar clearfix">
										<span class="pull-right">
											<a href="javascript:void(null)" class="reply" data-id="{$vo.cmtid}"><i class="fa fa-pencil"></i> 添加新回复</a>
										</span>
									</div>
								</div>
							</notempty>
							<form method="post" data-type="json" data-remote="true" accept-charset="UTF-8" action="/notes/4931489/comments" class="new-child-comment" style="display:none;">
								<input type="hidden" value="3255871" name="comment[parent_id]">
								<div class="comment-text">
									<textarea name="comment[content]" class="mousetrap" placeholder="写下你的评论…" maxlength="2000"></textarea>
									<div>
										<input type="submit" data-disable-with="提交中..." class="btn btn-small btn-info" value="发 表" name="commit">
										<div class="emoji">
											<a data-toggle="modal" href="#emoji-modal">
												<i class="fa fa-smile-o"></i>
											</a>
											<span class="hotkey">  Ctrl+Enter 发表  </span>
											<span style="display: none" class="warning">
												<i class="fa fa-exclamation-circle"></i>
												<span class="warning-text"></span>
											</span>
										</div>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</volist>
		</div>
		<if condition="$is_login EQ 1">
			<a name="pinglun"></a>
			<input type="hidden" value="{$info.aid}" name="aid" id="aid">
			<div class="comment-text">
				<textarea id="comment_content" name="comment[content]" class="mousetrap" placeholder="写下你的评论…" maxlength="2000"></textarea>
				<div>
					<input type="button" class="btn btn-info" value="发 表" name="commit" onclick="tijiao()">
					<span class="hotkey" onclick="tijiao()">Ctrl+Enter 发表</span>
					<span style="display: none" class="warning">
						<i class="fa fa-exclamation-circle"></i>
						<span class="warning-text"></span>
					</span>
				</div>
			</div>
		<else/>
			<p class="signout-comment">
				<a class="btn btn-info" data-signin-link="true" data-toggle="modal" href="/sign_in">
					登录后发表评论
				</a>
			</p>
		</if>
	</div>
	<!--文章评论列表end-->
</div>

<!--文章相关专题推荐-->
<div class="include-collection">
	<div class="content">
		<h5>被以下专题收入，发现更多相似内容：</h5>
		<ul id="all-collections" class="unstyled collections-list">
			<li>
				<a class="avatar" href="/collection/ef51d47f492d"><img src="__PUBLIC__/Picture/2.jpg" alt="180" /></a>
				<div class="collections-info">
					<h5>
						<a href="/collection/ef51d47f492d">语言学习</a>
					</h5>

					<div class="btn btn-success follow">
						<a data-signin-link="true" data-toggle="modal" href="/sign_in"><i class="fa fa-fw fa-plus"></i>  <span>添加关注</span></a>
						<span>63.0K</span>
					</div>

					<p class="description">本专题收录与外语学习、外语技巧、外国文学、实用外语、外语学习体验、外语学习历程有关的一切文章。中文请投稿「中文和汉字」专题。文...</p>
					<p>
						<a class="blue-link" href="/collection/ef51d47f492d">747篇文章</a> · 63039人关注
					</p>
				</div>
			</li>
			<li>
				<a class="avatar" href="/collection/un8RTj"><img src="__PUBLIC__/Picture/12.jpg" alt="180" /></a>
				<div class="collections-info">
					<h5>
						<a href="/collection/un8RTj">教育</a>
					</h5>
					<div class="btn btn-success follow">
						<a data-signin-link="true" data-toggle="modal" href="/sign_in"><i class="fa fa-fw fa-plus"></i>  <span>添加关注</span></a>
						<span>49.2K</span>
					</div>

					<p class="description">教育是启蒙，教育即生活，教育为未来生活之准备。 本专题仅收录与教育相关的想法、思考与见解。提高文章通过率，获得首页推荐，请务必...</p>
					<p>
						<a class="blue-link" href="/collection/un8RTj">4714篇文章</a> · 49276人关注
					</p>
				</div>
			</li>
			<li>
				<a class="avatar" href="/collection/uWzdYC"><img src="__PUBLIC__/Picture/yiwen.jpg" alt="180" /></a>
				<div class="collections-info">
					<h5>
						<a href="/collection/uWzdYC">翻译</a>
					</h5>
					<div class="btn btn-success follow">
						<a data-signin-link="true" data-toggle="modal" href="/sign_in"><i class="fa fa-fw fa-plus"></i>  <span>添加关注</span></a>
						<span>35.6K</span>
					</div>

					<p class="description"></p>
					<p>
						<a class="blue-link" href="/collection/uWzdYC">1175篇文章</a> · 35621人关注
					</p>
				</div>
			</li>
		</ul>
	</div>
</div>
<!--文章相关专题推荐end-->
<input type="hidden" name="id" id="id" value="{$info.aid}">
<input type="hidden" name="uid" id="uid" value="{$info.uid}">

<script type="text/javascript">
	function tijiao(){
		var aid = $('#aid').val();
		var content = $('#comment_content').val();
		$.post('__URL__/add_comment',{aid:aid,content:content},function(data){
				if(data.result==1){
					$("#comment-list").append(data.html);
					$('.likecomment').click(function(){
						var id = $(this).attr('data-id');
						var t = $(this);
						$.get('__URL__/like_comment',{id:id},function(data){
							if(data.result==1){
								t.find("i").attr("class", "fa fa-heart");
								t.find("span").html('('+data.zan_count+')');
							}else if(data.result==2){
								var url = '{:U("Home/User/login")}';
								location.href = url;
							}else if(data.result==3){
								alert('评论不存在');
							}else{
								t.find("i").attr("class", "fa fa-heart-o");
								t.find("span").html('('+data.zan_count+')');
							}
						},"json");
					});
				}else if(data.result==2){
					var url = '{:U("Home/User/login")}';
					location.href = url;
				}
				
		},"json");
	}
	(function($) { 
		$(function() {
			//打开喜欢用户列表页面
			$('#likes-count').click(function(){
				var id = $('#id').val();
				$.get('__URL__/like_user',{id:id},function(data){
					$('#likelist').html(data.html);
					$('.modal').addClass('in');
					$('.modal').css('display','block');
				},"json");
				
			});
			//关闭喜欢用户列表页面
			$('.close').click(function(){
				$('.modal').removeClass('in');
				$('.modal').css('display','none');
			});
			$('#like-note').click(function(){
				var id = $('#id').val();
				$.get('__URL__/edit_like',{id:id},function(data){
					if(data.result==1){
						$('.like').addClass('note-liked');
						$('#likes-count').html(data.like_count);
					}else if(data.result==2){
						var url = '{:U("Home/User/login")}';
						location.href = url;
					}else if(data.result==3){
						alert('文章不存在');
					}else{
						$('.like').removeClass('note-liked');
						$('#likes-count').html(data.like_count);
					}
				},"json");
			});
			$('#attention').click(function(){
				var id = $('#uid').val();
				$.get('__URL__/enit_attention',{id:id},function(data){
					if(data.result==1){


						$('#attention').removeClass('btn-success');
						$('#attention i').removeClass('fa-plus');

						$('#attention').addClass('following');
						$('#attention i').addClass('fa-check');
						$('#attention span').html('正在关注');
					}else if(data.result==2){
						var url = '{:U("Home/User/login")}';
						location.href = url;
					}else if(data.result==3){
						alert('用户不存在');
					}else{
						$('#attention').removeClass('following');
						$('#attention i').removeClass('fa-check');

						$('#attention').addClass('btn-success');
						$('#attention i').addClass('fa-plus');

						$('#attention span').html('添加关注');
					}

				},"json");
			});
			$('.likecomment').click(function(){
				var id = $(this).attr('data-id');
				var t = $(this);
				$.get('__URL__/like_comment',{id:id},function(data){
					if(data.result==1){
						t.find("i").attr("class", "fa fa-heart");
						t.find("span").html('('+data.zan_count+')');
					}else if(data.result==2){
						var url = '{:U("Home/User/login")}';
						location.href = url;
					}else if(data.result==3){
						alert('评论不存在');
					}else{
						t.find("i").attr("class", "fa fa-heart-o");
						t.find("span").html('('+data.zan_count+')');
					}
				},"json");
			});

			
			$('.order a').click(function(){
				var ord = $(this).attr('data-order');
				var o = $(this);
				var id = $('#id').val();
				$.get('__URL__/getList',{id:id,ord:ord},function(data){
					if(data.result==1){
						$('#comment-list').html(data.html);
						
						o.addClass('active').css({'color':'#000'}).siblings().removeClass('active').css({'color':'#ccc'});
						$('.likecomment').click(function(){
							var id = $(this).attr('data-id');
							var t = $(this);
							$.get('__URL__/like_comment',{id:id},function(data){
								if(data.result==1){
									t.find("i").attr("class", "fa fa-heart");
									t.find("span").html('('+data.zan_count+')');
								}else if(data.result==2){
									var url = '{:U("Home/User/login")}';
									location.href = url;
								}else if(data.result==3){
									alert('评论不存在');
								}else{
									t.find("i").attr("class", "fa fa-heart-o");
									t.find("span").html('('+data.zan_count+')');
								}
							},"json");
						});
					} else {
						alert('该文章不存在');
					}
				},"json")
				
				
			});
		});
	})(jQuery);


</script>
</block>
